package com.tj.bo.user.client.enums;

/**
 * Created with IntelliJ IDEA.
 * User: binary
 * Date: 2020/6/9
 * Time: 下午5:38
 */
public enum EmailTypeEnum {

    FORGET_LOGIN_PASSWORD("FORGET_LOGIN_PASSWORD"),
    EMAIL_LOGIN_BY_VERIFY_CODE("EMAIL_LOGIN_BY_VERIFY_CODE");

    private String type;

    EmailTypeEnum(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public EmailTypeEnum setType(String type) {
        this.type = type;
        return this;
    }

    public static EmailTypeEnum getEnum(String type) {
        EmailTypeEnum e = null;
        for (EmailTypeEnum enumObj : EmailTypeEnum.values()) {
            if (enumObj.getType().equals(type)) {
                e = enumObj;
                break;
            }
        }
        return e;
    }
}
